{% macro next_page_link(class=None) -%}
{% if paging %}

{% set class = class or 'pull-right' %}
  <ul class="pager">

    {% if paging.previous_cursor is defined %}
    <li class="previous">
        <a href="{{this.uri(_pass_all=True, cursor=paging.previous_cursor)}}" class='paging-previous-link'><i class="glyphicon glyphicon-chevron-left "></i></a>
    </li>
    {% else %}
    <li class="previous disabled">
        <span class='paging-previous-link'><i class="glyphicon glyphicon-chevron-left "></i></span>
    </li>
    {% endif %}

    <li class="disabled">
        <span class="paging_text">
            Page {{paging.page}}
        </span>
    </li>

    {% if paging.next_cursor %}
    <li class="next">
        <a href="{{this.uri(_pass_all=True, cursor=paging.next_cursor)}}" class='paging-next-link'><i class="glyphicon glyphicon-chevron-right "></i></a>
    </li>
    {% else %}
    <li class="next disabled">
        <span class='paging-next-link'><i class="glyphicon glyphicon-chevron-right "></i></span>
    </li>
    {% endif %}
  </ul>
{% endif %}
{%- endmacro %}
